// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/libs/request';

// 保险类型列表
export function getInsuranceTypeList(data) {
  return request({
    url: 'insurance/insuranceType',
    method: 'get',
    params: data,
  });
}

// 新增或编辑保险类型
export function setInsuranceType(data) {
  return request({
    url: data.url,
    method: data.method,
    data: data.datas,
  });
}

// 保险类型详情
export function getInsuranceTypeDetail(id) {
  return request({
    url: `insurance/insuranceType/${id}`,
    method: 'get',
  });
}

// 保险类型列表（全部）
export function getInsuranceTypeAll(data) {
  return request({
    url: 'insurance/insuranceTypeAll',
    method: 'get',
    params: data,
  });
}

// 保险列表
export function getInsuranceList(data) {
  return request({
    url: 'insurance/insurance',
    method: 'get',
    params: data,
  });
}

// 新增或编辑保险
export function setInsurance(data) {
  return request({
    url: data.url,
    method: data.method,
    data: data.datas,
  });
}

// 保险详情
export function getInsuranceDetail(id) {
  return request({
    url: `insurance/insurance/${id}`,
    method: 'get',
  });
}

// 用户列表
export function getUserList(data) {
  return request({
    url: 'insurance/userList',
    method: 'get',
    params: data,
  });
}
